package com.example.competitionregistration.controller;

import com.example.competitionregistration.common.Result;
import com.example.competitionregistration.controller.dto.UserDto;
import com.example.competitionregistration.service.RegisterService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * @Author QuanJingFang
 * @Description //TODO 注册控制层，接收前端的请求
 * @Date 2023/7/17 21:26
 **/
@RestController
@RequestMapping("/Register/")
public class RegisterController {
    @Resource
    private RegisterService registerService;

    /**
     * @Author QuanJingFang
     * @Description //TODO 学生注册控制层
     * @Date 2023/7/17 23:04
     * @Param [studentDto]
     * @return com.example.competitionregistration.entity.Result
     **/
    @PostMapping("/register")
    public Result register(@RequestBody UserDto userDto){
        return registerService.register(userDto);
    }
}
